package com.solution.model;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.SequenceGenerator;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * AnswerType
 */
@Entity
@Table(name="Answer_Type"
    ,schema="public"
)
public class AnswerType extends AbstractPO
 {

	
	private static final long serialVersionUID = 1L;
	
    private Long id;
    private QuestionType questionType;
    private ImageType imageType;
    private String answerValue;
    private Boolean isCorrect;
    private Short status;
    private String statusReason;
    private String createdBy;
    private Date createdOn;
    private String modifiedBy;
    private Date modifiedOn;
    private String rfu1;
    private String rfu2;
    private String rfu3;

    @SequenceGenerator(name="generator", sequenceName="answer_type_seq")@Id @GeneratedValue(strategy=SEQUENCE, generator="generator")
    
    @Column(name="Answer_TypeID", unique=true, nullable=false, precision=10, scale=0)
    public Long getId() {
        return this.id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    @ManyToOne(fetch=FetchType.EAGER)
    @JoinColumn(name="Question_TypeID", nullable=false)
    public QuestionType getQuestionType() {
        return this.questionType;
    }
    
    public void setQuestionType(QuestionType questionType) {
        this.questionType = questionType;
    }
    @ManyToOne(fetch=FetchType.EAGER, cascade=CascadeType.ALL)
    @JoinColumn(name="Image_TypeID")
    public ImageType getImageType() {
        return this.imageType;
    }
    
    public void setImageType(ImageType imageType) {
        this.imageType = imageType;
    }
    
    @Column(name="Answer_Value", nullable=false, length=500)
    public String getAnswerValue() {
        return this.answerValue;
    }
    
    public void setAnswerValue(String answerValue) {
        this.answerValue = answerValue;
    }
    
    @Column(name="Is_Correct", nullable=false)
    public Boolean getIsCorrect() {
        return this.isCorrect;
    }
    
    public void setIsCorrect(Boolean isCorrect) {
        this.isCorrect = isCorrect;
    }
    
    @Column(name="Status", nullable=false, precision=4, scale=0)
    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
    }
    
    @Column(name="Status_Reason", length=2000)
    public String getStatusReason() {
        return this.statusReason;
    }
    
    public void setStatusReason(String statusReason) {
        this.statusReason = statusReason;
    }
    
    @Column(name="CreatedBy", nullable=false, length=50)
    public String getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }
    
    @Column(name="CreatedOn", nullable=false, length=23)
    public Date getCreatedOn() {
        return this.createdOn;
    }
    
    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }
    
    @Column(name="ModifiedBy", length=50)
    public String getModifiedBy() {
        return this.modifiedBy;
    }
    
    public void setModifiedBy(String modifiedBy) {
        this.modifiedBy = modifiedBy;
    }
    
    @Column(name="ModifiedOn", length=23)
    public Date getModifiedOn() {
        return this.modifiedOn;
    }
    
    public void setModifiedOn(Date modifiedOn) {
        this.modifiedOn = modifiedOn;
    }
    
    @Column(name="RFU1", length=100)
    public String getRfu1() {
        return this.rfu1;
    }
    
    public void setRfu1(String rfu1) {
        this.rfu1 = rfu1;
    }
    
    @Column(name="RFU2", length=100)
    public String getRfu2() {
        return this.rfu2;
    }
    
    public void setRfu2(String rfu2) {
        this.rfu2 = rfu2;
    }
    
    @Column(name="RFU3", length=100)
    public String getRfu3() {
        return this.rfu3;
    }
    
    public void setRfu3(String rfu3) {
        this.rfu3 = rfu3;
    }




}


